using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;

namespace Liya.Crm.Data.Models.Mapping
{
    public class Sys_ModuleMap : EntityTypeConfiguration<Sys_Module>
    {
        public Sys_ModuleMap()
        {
            // Primary Key
            this.HasKey(t => t.MId);

            // Properties
            this.Property(t => t.MName)
                .HasMaxLength(50);

            this.Property(t => t.MMemo)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("Sys_Module");
            this.Property(t => t.MId).HasColumnName("MId");
            this.Property(t => t.MName).HasColumnName("MName");
            this.Property(t => t.MUse).HasColumnName("MUse");
            this.Property(t => t.MMemo).HasColumnName("MMemo");
        }
    }
}
